<h1>Change Appointment</h1>

<p><?php echo validation_errors(); ?></p>
<form action="<?php echo site_url('visits'); ?>/update/<?php echo $visit->visit_id; ?>" method="post">
<fieldset>
        <legend>Visit Information</legend>
				<input type='hidden' name='id' value='<?php echo $visit->visit_id; ?>' />
				 <p><label>Appointment for <?php echo $visit->name; ?></label></p>
				 <label for="vdate">Visit Date:</label><input type="text" name="vdate" id="vdate" tabindex="1" value="<?php echo $visit->visit_date; ?>" /><label>YYYY-MM-DD</label>
				 <label for="vtime">Visit Time:</label><input type="text" name="vtime" id="vtime" tabindex="2" value="<?php echo $visit->visit_time; ?>" /><label>HH:MM </label><p/>
        
        <label for="purpose">Purpose:</label><textarea id="purpose" name="purpose" tabindex="3" cols="61" rows="3" ><?php echo $visit->purpose; ?></textarea><p/>
				<label for="action">Action:</label><textarea id="action" name="action" tabindex="4" cols="61" rows="3"  <?php if($permission ==0) echo "disabled";?> ><?php echo $visit->action; ?></textarea><p/>
				<label for="docnotes">Doctor Notes:</label><textarea id="docnotes" name="docnotes" tabindex="5" cols="61" rows="3" <?php if($permission ==0) echo "disabled";?>	><?php echo $visit->doctor_notes; ?></textarea><p/>
				<label for="other">Other Notes:</label><textarea id="other" name="other" tabindex="6" cols="61" rows="3" ><?php echo $visit->other_notes; ?></textarea><p/>

        <button type="submit" tabindex="7">Submit &raquo;</button>
    </fieldset>
</form>

